pub fn new_birthday_probability(n: u32) -> f64 {
    if n > 365 {
        return 1.0000;
    }

    let mut result = 1.0000;
    for i in 0..n {
        result = result * (365 - i) as f64 / 365.0;  // 计算公式为 1 - A(365, n) / 365^n, 迭代计算，避免溢出
    }
    1.0 - result
}
